//
//  
//	GSM-Link - a free SMS messaging library for .NET
//	Copyright (C) 2003 Cris Almodovar
//
//	This library is free software; you can redistribute it and/or
//	modify it under the terms of the GNU Lesser General Public
//	License as published by the Free Software Foundation; either
//	version 2.1 of the License, or (at your option) any later version.
//
//	This library is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
//	Lesser General Public License for more details.
//
//	You should have received a copy of the GNU Lesser General Public
//	License along with this library; if not, write to the Free Software
//	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
//

using System;

namespace GsmLink
{
	public delegate void MessageReceivedEventHandler(object sender, MessageReceivedEventArgs e);

	public delegate void SwappedEventHandler(object sender, SwappedEventArgs e);

	public delegate void SendMessageResultEventHandler(object sender, SendMessageResultEventArgs e);

	public delegate void BatteryLevelChangedEventHandler(object sender, BatteryLevelChangedEventArgs e);

	public delegate void SignalQualityChangedEventHandler(object sender, SignalQualityChangedEventArgs e);

	public class MessageReceivedEventArgs : EventArgs
	{
		private SmsMessage[] messages = new SmsMessage[0];

		public MessageReceivedEventArgs(SmsMessage[] messages)
		{
			if (messages != null)
				this.messages = messages;
		}

		public SmsMessage[] Messages
		{
			get { return this.messages; }
		}
	}

	public class SwappedEventArgs : EventArgs
	{		
		private string lastManufacturer = "";
		private string lastModel = "";
		private string lastSerialNumber = "";				

		public SwappedEventArgs(string lastManufacturer, string lastModel, string lastSerialNumber)
		{
			this.lastManufacturer = lastManufacturer;
			this.lastModel = lastModel;
			this.lastSerialNumber = lastSerialNumber;
		}

		public string LastManufacturer
		{
			get { return this.lastManufacturer; }
		}

		public string LastModel 
		{
			get { return this.lastModel; }
		}

		public string LastSerialNumber
		{
			get { return this.lastSerialNumber; }
		}
	}

	public class SendMessageResultEventArgs : EventArgs
	{
		private int retryCount = 0;
		private SmsMessage message = null;

		public SendMessageResultEventArgs(int retryCount, SmsMessage message)
		{
			this.retryCount = retryCount;
			this.message = message;
		}

		public int RetryCount
		{
			get { return this.retryCount; }
		}

		public SmsMessage Message
		{
			get { return this.message; }
		}
	}

	public class BatteryLevelChangedEventArgs : EventArgs
	{
		private int batteryLevel = -1;		

		public BatteryLevelChangedEventArgs(int batteryLevel)
		{
			this.batteryLevel = batteryLevel;
		}

		public int BatteryLevel
		{
			get { return this.batteryLevel; }
		}
	}

	public class SignalQualityChangedEventArgs : EventArgs
	{
		private int signalQuality = -1;		

		public SignalQualityChangedEventArgs(int signalQuality)
		{
			this.signalQuality = signalQuality;
		}

		public int SignalQuality
		{
			get { return this.signalQuality; }
		}
	}
}
